<%@page import="java.util.*"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<% String path = request.getContextPath();
	String basePath = request.getScheme()+"://" +request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href="<%=basePath%>"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="css/backstyle.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="js/jquery.js"></script>
	<script type="text/javascript">
		$(function () {

			// 获取父类别
			var gpid ="${goodsType.gpid}";

			// 选中
			$("#gpid").val(gpid); // 根据option中的value值选中
		})
	</script>
</head>

<body>

<div class="place">
	<span>位置：</span>
	<ul class="placeul">
		<li><a href="#">首页</a></li>
		<li><a href="#">表单</a></li>
	</ul>
</div>

<div class="formbody">

	<div class="formtitle"><span>修改商品类别信息</span></div>
	<form method="post" action="GoodsTypeServlet/goodstypeupdate2">

		<input type="hidden" name="id"	value="${goodstype.id}" />

		<ul class="forminfo">
			<li><label>商品类别名称</label><input name="gname" id="gname" value="${goodstype.gname}" type="text" class="dfinput" /><span id="gname_msg"></span> </li>
<%--			<li><label>年龄</label><input name="age" value="20" id="age" type="text" class="dfinput"/></li>--%>

			<li><label>父类别</label>
				<select name="gpid" id="gpid" >
					<option value="0">无</option>
					<c:forEach items="${goodsTypeList}" var="goodsType">
						<option value="${goodsType.id}" >${goodsType.gname}</option>
					</c:forEach>
				</select>
			</li>

<%--			<li><label>邮箱</label><input name="email" id="email" value="${user.email}" type="text" class="dfinput"/><span id="email_msg"></span>  </li>--%>
<%--			<li><label>生日</label><input name="birthday" value="${user.birthday}" id="birthday" type="date" class="dfinput"/></li>--%>

			<li><label>&nbsp;</label><input name="" type="submit" class="btn" value="确认保存"/></li>
		</ul>
	</form>
</div>
<div style="display:none"><script src='http://v7.cnzz.com/stat.php?id=155540&web_id=155540' language='JavaScript' charset='gb2312'></script></div>
</body>
</html>

